package cn.ultrarisk.scadmin.manager.biz.solr.entity;

import cn.ultrarisk.mybatis.extension.annotation.Table;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;


/**
 * solr集合副本缓存实体类
 *
 * @author sevendlong(lin23871@163.com)
 * @date 2014/4/14
 * @since V1.0
 */
@Table(table = "solr_cache", idColumn = SolrCache.ID, autoIncrement = true)
public class SolrCache implements Serializable {
    private static final long serialVersionUID = -3743338430852486378L;

    public final static String ID = "id";
    public final static String REPLICA_ID = "replica_id";
    public final static String CACHE_TYPE = "cache_type";
    public final static String CACHE_CLASS = "cache_class";
    public final static String CACHE_VERSION = "cache_version";
    public final static String CACHE_DESCRIPTION = "cache_description";
    public final static String UPDATE_TIME = "update_time";

    public static final Map<String, String> COLUMN_PROPERTY_MAP = new LinkedHashMap<String, String>();

    static {
        COLUMN_PROPERTY_MAP.put(ID, "id");
        COLUMN_PROPERTY_MAP.put(REPLICA_ID, "replicaId");
        COLUMN_PROPERTY_MAP.put(CACHE_TYPE, "cacheType");
        COLUMN_PROPERTY_MAP.put(CACHE_CLASS, "cacheClass");
        COLUMN_PROPERTY_MAP.put(CACHE_VERSION, "cacheVersion");
        COLUMN_PROPERTY_MAP.put(CACHE_DESCRIPTION, "cacheDescription");
        COLUMN_PROPERTY_MAP.put(UPDATE_TIME, "updateTime");
    }

    /**
     * id
     */
    private Integer id;
    /**
     * 副本id
     */
    private Integer replicaId;
    /**
     * 缓存类型
     */
    private String cacheType;
    /**
     * 缓存实现类
     */
    private String cacheClass;
    /**
     * 缓存版本
     */
    private String cacheVersion;
    /**
     * 缓存描述
     */
    private String cacheDescription;
    /**
     * 更新时间
     */
    private Long updateTime;

    public SolrCache() {
    }

    public SolrCache(Integer replicaId, String cacheType) {
        this.replicaId = replicaId;
        this.cacheType = cacheType;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getReplicaId() {
        return replicaId;
    }

    public void setReplicaId(Integer replicaId) {
        this.replicaId = replicaId;
    }

    public String getCacheType() {
        return cacheType;
    }

    public void setCacheType(String cacheType) {
        this.cacheType = cacheType;
    }

    public String getCacheClass() {
        return cacheClass;
    }

    public void setCacheClass(String cacheClass) {
        this.cacheClass = cacheClass;
    }

    public String getCacheVersion() {
        return cacheVersion;
    }

    public void setCacheVersion(String cacheVersion) {
        this.cacheVersion = cacheVersion;
    }

    public String getCacheDescription() {
        return cacheDescription;
    }

    public void setCacheDescription(String cacheDescription) {
        this.cacheDescription = cacheDescription;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

}